home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3996 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1007 b 

  1. Path: news.cencom.net!ns!tanp
  2. From: tanp@ns (Bill Wendling)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: list permutation algorithms
  5. Date: 1 Feb 1996 08:30:43 GMT
  6. Organization: Cen-Com Internet
  7. Message-ID: <4eptnj$jbs@news.cencom.net>
  8. References: <bwood-3001961654260001@ruger-90.slip.uiuc.edu>
  9. NNTP-Posting-Host: ns.cencom.net
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Brett Wood inexplicably wrote:
  13. } I am looking for a simple algorithm to find all of the possible permutations of 
  14. } a one-dimensional array. For example, the permutations of {1,2,3} are:
  15. }    {1,2,3}
  16. }    {1,3,2}
  17. }    {2,1,3}
  18. }    {2,3,1}
  19. }    {3,1,2}
  20. }    {3,2,1} 
  21. } Does anyone know one off-hand, or where I might find one?  
  22. } Thank you, Brett Wood
  23.  
  24. I'm sure your professor or TA has the answer.  But this isn't a group
  25. that does your homework for you.
  26.  
  27. --
  28. Bill Wendling         | "Pinky, are you thinking what I'm thinking?"
  29. tanp@ns.cencom.net  | "I think so, Brain, but burlap chafes me so."
  30. "Boom Shanka"       | Finger me for my Geek Code...NOW!
  31.